package com.xbs.service.enterprise;

import java.util.List;

import com.xbs.dao.enterprise.EnterpriseSelfOrderDao;
import com.xbs.entity.EnterpriseOrderEntity;
import com.xbs.entity.EnterpriseOrderQueryEntity;
import com.xbs.utils.PageUtilEntity;

public class EnterpriseSelfOrderService {
	EnterpriseSelfOrderDao dao=new EnterpriseSelfOrderDao();
	/**
	 * 获取根据企业账户获取企业订单编号
	 */
	public List<EnterpriseOrderEntity> getSelfOrderByAccount(String account){
		return dao.getSelfOrder(account);
	}
	/**
	 * 
	 * @param e
	 * @return
	 */
	public List<EnterpriseOrderEntity> getSelfOrderMulcondition(EnterpriseOrderQueryEntity e){
		return dao.getSelfOrderMulcondition(e);
	}
	/**
	 * 返回分页实体类
	 * @param e
	 * @param currPage
	 * @param pageSize
	 * @return
	 */
	public PageUtilEntity<EnterpriseOrderEntity> getSelfOrderMulconditionPage(EnterpriseOrderQueryEntity e,Integer currPage,Integer pageSize){
		PageUtilEntity<EnterpriseOrderEntity> page=new PageUtilEntity<EnterpriseOrderEntity>();
		page.setCurrpage(currPage);
		page.setSumRecord(dao.getEnterpriseSelfCount(e));
		page.setIst(dao.getSelfOrderMulconditionPage(e, currPage, pageSize));
		page.setPageSize(pageSize);
		return page;
	}
	
}
